package com.music.set;

import com.music.R;
import com.music.player.PlayerService;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.RadioGroup.OnCheckedChangeListener;

public class LookLrcActivity extends Activity{
	RadioGroup rg=null;
	RadioButton r1;
	RadioButton r2;
	Button b1;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.look);
		rg=(RadioGroup)findViewById(R.id.radioGroup2);
		r1=(RadioButton)findViewById(R.id.radioButton4);
		r2=(RadioButton)findViewById(R.id.radioButton5);
		if(PlayerService.look==0){
			r1.setChecked(true);
		}else if(PlayerService.look==1){
			r2.setChecked(true);
		}
		rg.setOnCheckedChangeListener(new OnCheckedChangeListener() {
			@Override
			public void onCheckedChanged(RadioGroup arg0, int arg1) {
				// TODO Auto-generated method stub
				if(arg1==R.id.radioButton4){
					PlayerService.look=0;
				}else if(arg1==R.id.radioButton5){
					PlayerService.look=1;
				}
			}
		});
		b1=(Button)findViewById(R.id.set_button2);
		b1.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Log.i("info", PlayerService.look+"");
				LookLrcActivity.this.finish();
			}
		});
	}
}
